<!--
  To change this license header, choose License Headers in Project Properties.
  To change this template file, choose Tools | Templates
  and open the template in the editor.
-->

<%@ page contentType="text/html;charset=UTF-8" %>

<html>
    <head>
        <meta name="layout" content="frontend">
        <script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.13.0/jquery.validate.min.js"></script>
        <script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.13.0/localization/messages_zh_TW.js"></script>
        <!-- jQuery UI -->
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
    </head>
    <body>
        <g:if test="${flash.message}">
            <div class="message" role="status">${flash.message}</div>
        </g:if>
        <g:form action="regQueryCancel">
            <table>
                <thead>
                    <tr>

                        <th><g:message code="register.serial.label" default="Serial" /></th>

                        <th><g:message code="register.event.label" default="Event" /></th>

                        <th>時間起迄</th>

                        <th>報名狀態</th>

                        <!--<th>詳細資訊</th>-->

                    </tr>
                </thead>
                <tbody>
                    <g:each in="${registerList}" status="i" var="registerInstance">
                        <tr class="${(i % 2) == 0 ? 'even' : 'odd'}">

                            <g:checkBox name="cancel" value="${registerInstance.id}" checked="true" hidden="true"/>

                            <td>${fieldValue(bean: registerInstance, field: "serial")}</td>

                            <td>${fieldValue(bean: registerInstance, field: "event")}</td>

                            <td>${formatDate(format:"MM/dd HH:mm",date:registerInstance.event.dateStart)} ~ ${formatDate(format:" HH:mm",date:registerInstance.event.dateEnd)}</td>

                            <td>${registerInstance.status}</td>

                            <!--<td><a href="#" name="show" eventId="${registerInstance.event.id}">顯示</a></td>-->

                        </tr>
                    </g:each>
                </tbody>
            </table>
            <!--<div class="pagination">-->
                <!--<m:paginate total="${resultsTotal}" />-->
            <!--</div>-->
                請點選「確認取消」鍵取消報名　<g:submitButton name="regEvents" value="確認取消" class="btn btn-primary btn-sm" /> <g:link action="index" class="btn btn-danger btn-sm">放棄取消</g:link>
                <!--　或　<a href="javascript: history.back()" class="btn btn-danger btn-sm">回去修改</a> -->
                <span id="error" style="color:red;display:none">　最少需選一場次！</span>
                <div id="somediv" title="場次資訊" style="display:none;">
                    <iframe id="thedialog" width="700" height="500" frameborder="0" scrolling="auto"></iframe>
                </div>
        </g:form>
    </body>
</html>